map operator
(If you want geographical map, see maps) PythonSpeed/PerformanceTips - Python Wiki
You can think of map as a for moved into C code. The only restriction is that the "loop body" of map must be a function call. Besides the syntactic benefit of list comprehensions, they are often as fast or faster than equivalent use of map. code:python
newlist = map(str.upper, oldlist)
instead of
code:python
newlist = []
for word in oldlist:
newlist.append(word.upper())
See also